import React, { Component } from 'react'
import { Switch, Route, Redirect } from 'react-router-dom'
import BarChart from './BarChart'
import LineChart from './LineChart'
import PieChart from './PieChart'

export default class Charts extends Component {
  render() {
    return (
      <div>
        <Switch>
          <Route path="/charts/barchart" component={BarChart}></Route>
          <Route path="/charts/linechart" component={LineChart}></Route>
          <Route path="/charts/piechart" component={PieChart}></Route>
          <Redirect to="/home" />
        </Switch>
      </div>
    )
  }
}
